home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / fontconfig.postinst < prev    next >
Encoding:
Text File  |  2007-01-05  |  1.4 KB  |  41 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. if [ "$1" = configure ]; then
  6.   # Ensure Defoma subst file exists, with some default substitutions
  7.   if ! defoma-subst check-rule fontconfig; then
  8.     defoma-subst new-rule fontconfig \
  9.       'serif --GeneralFamily,* Roman --Shape Serif Upright --Weight Medium' \
  10.       'sans-serif --GeneralFamily,* SansSerif --Shape NoSerif Upright --Weight Medium' \
  11.       'monospace --Width,* Fixed --GeneralFamily,2 Typewriter --Shape Upright --Weight Medium'
  12.   fi
  13. fi
  14.  
  15. # Automatically added by dh_installdefoma
  16. if [ "$1" = "configure" ]; then
  17.  
  18.   test -x /usr/bin/defoma-app && /usr/bin/defoma-app update fontconfig
  19.  
  20. fi
  21. # End automatically added section
  22.   
  23.  
  24. if [ "$1" = configure ]; then
  25.   if dpkg --compare-versions "$2" lt 2.4.0-1; then
  26.   printf "Cleaning up old fontconfig caches... "
  27.   for dir in /usr/share/fonts /var/lib/defoma/fontconfig.d /usr/X11R6/lib/X11/fonts /usr/local/share/fonts ; do
  28.       if [ -d $dir ]; then
  29.         find $dir -name fonts.cache-1 -exec rm -f \{\} \;
  30.         find $dir -depth -mindepth 1 -type d -exec rmdir --ignore-fail-on-non-empty \{\} \;
  31.     fi
  32.   done
  33.   printf "done.\n"
  34.   fi
  35.   # Force regeneration of all fontconfig cache files.
  36.   mkdir -p /var/cache/fontconfig
  37.   printf "Regenerating fonts cache... "
  38.   fc-cache -s -f -v 1>/var/log/fontconfig.log 2>&1 || (printf "failed.\nSee /var/log/fontconfig.log for more information.\n"; exit 1)
  39.   printf "done.\n"
  40. fi
  41.